package com.lang.automobile

import android.app.Application
import com.blankj.utilcode.util.ProcessUtils
import com.hzjh.base.ext.http.HttpConfig
import com.hzjh.base.log.JHLogger
import com.hzjh.base.style.util.RlkjRefresher
import com.hzjh.base.utils.JHUtils
import com.hzjh.base.utils.other.JHAppStateManager
import com.hzjh.base.web.util.WebUtil

class AutoMobileApp : Application() {
    override fun onCreate() {
        super.onCreate()
        //初始化工具包
        JHUtils.init(this)
        //日志初始化
        JHLogger.initLog(this,BuildConfig.DEBUG)
        //网络初始化
        HttpConfig.init()
        //初始化下拉上拉刷新样式
        RlkjRefresher.initRefreshStyle()
        //初始化app状态
        JHAppStateManager.init(this)

        when (ProcessUtils.getCurrentProcessName()) {
            this.packageName -> {
                // 主进程初始化...
                WebUtil.initWebViewPool(this,true)
            }
        }
    }
}